{include file="common/head"}
    <link rel="stylesheet" href="/static/flatpickr/flatpickr.min.css">
    <script src="/static/flatpickr/flatpickr.js"></script>
<head>
<title>红包设置</title>
<link    rel="stylesheet"    href="https://cdnjs.cloudflare.com/ajax/libs/jodit/3.24.2/jodit.es2018.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jodit/3.24.2/jodit.es2018.min.js"></script>    

<style>
  .box{border:1px solid #ccc;margin: 10px 0;padding: 10px;box-shadow: 1px 1px 3px #777;}
</style>
</head>
<body style="">
    <div class=" p-3 my-3 " style="max-width: 800px;"  >
      <h2><a href='/index.php/cat/fee_setup'>收款项目设置</a>  红包设置 <a href='/index.php/refund/voucher_list'>优惠券设置</a></h2>    
    <form method="post" action="/refund/config" enctype="multipart/form-data" class="box">
      <input type="hidden" name="id" id="id" value="{$data.id}" />
      <div class="text-info">普通红包设置</div>
      <div class="row mb-3">
        <div class="col">
          <label for="min" class="form-label">最小金额【学员】：</label>
          <input type="num" class="form-control" id="min_member" name="min_member" value="{$data.min_member}" />
        </div>
        <div class="col">
          <label for="max" class="form-label">最大金额【学员】：</label>
          <input type="num" class="form-control" id="max_member" name="max_member" value="{$data.max_member}" />
        </div>
      </div>

      <div class="row mb-3">
        <div class="col">
          <label for="min" class="form-label">最小金额【游客】：</label>
          <input type="num" class="form-control" id="min" name="min" value="{$data.min}" />
        </div>
        <div class="col">
          <label for="max" class="form-label">最大金额【游客】：</label>
          <input type="num" class="form-control" id="max" name="max" value="{$data.max}" />
        </div>
      </div>
      <div class="row mb-3">
        <div class="col">
          <label for="day_max" class="form-label">每天最多几个红包：</label>
          <input type="num" class="form-control" id="day_max" name="day_max" value="{$data.day_max}" />
        </div>
        <div class="col">
          <label for="hours" class="form-label">红包间隔几小时：</label>
          <input type="num" class="form-control" id="hours" name="hours" value="{$data.hours}" />
        </div>
      </div>

      <div class="row mb-3">
        <div class="col">
          <label for="start_time" class="form-label">开始时间：</label>
          <input type="text" class="form-control" id="start_time" name="start_time" value="{$data.start_time}" />
        </div>
        <div class="col">
          <label for="end_time" class="form-label">结束时间：</label>
          <input type="text" class="form-control" id="end_time" name="end_time" value="{$data.end_time}" />
        </div>
      </div> 

      <div class="text-info">推广红包设置(学员报名，给邀请人发红包)</div>
      <div class="row mb-3">
        <div class="col">
          <label for="comm_invite" class="form-label">C1,C2推广红包：</label>
          <input type="num" class="form-control" id="comm_invite" name="comm_invite" min="10" max="600"　 value="{$data.comm_invite}" />
        </div>
        <div class="col">
          <label for="comm_invite2" class="form-label">D,E,F推广红包：</label>
          <input type="num" class="form-control" id="comm_invite2" name="comm_invite2" min="10" max="300"　 value="{$data.comm_invite2}" />
        </div>        
      </div>  

      <button  type="button" class="btn btn-primary" onclick="doSave()">保存设置</button>
    </form>
    <br/>

  


    </div>


<script type="text/javascript">

    flatpickr("#start_time,#end_time", {});
    $("#start_time,#end_time").flatpickr({
        enableTime: true,
        dateFormat: "Y-m-d H:i:s",
    });

    function doSave(){
  
      $('form').submit();
    }

</script>


</body>
</html>
